package com.weiyin.examination.http.apiservice;


import com.weiyin.examination.http.RequestUrl;

import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;
import rx.Observable;

public interface CoolService {

    @GET(RequestUrl.PATH_APP)
    Observable<ResponseBody> getPaper(@QueryMap Map<String, String> params);

    @GET(RequestUrl.LOGIN)
    Observable<ResponseBody> login(@Query("number") String number, @Query("name") String name);

    @GET
    Call<ResponseBody> downloadFileWithDynamicUrlSync(@Url String fileUrl);

    @Multipart
    @POST(RequestUrl.fileUpload)
    Observable<ResponseBody> fileUpload(@Part MultipartBody.Part part);

    @POST(RequestUrl.uploadScore)
    @FormUrlEncoded
    Observable<ResponseBody> uploadScore(@FieldMap Map<String, String> map);
}
